package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RePhotoMapper;
import com.ruoyi.system.domain.RePhoto;
import com.ruoyi.system.service.IRePhotoService;
import com.ruoyi.common.core.text.Convert;

/**
 * photoService业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-24
 */
@Service
public class RePhotoServiceImpl implements IRePhotoService 
{
    @Autowired
    private RePhotoMapper rePhotoMapper;

    /**
     * 查询photo
     * 
     * @param id photo主键
     * @return photo
     */
    @Override
    public RePhoto selectRePhotoById(Long id)
    {
        return rePhotoMapper.selectRePhotoById(id);
    }

    /**
     * 查询photo列表
     * 
     * @param rePhoto photo
     * @return photo
     */
    @Override
    public List<RePhoto> selectRePhotoList(RePhoto rePhoto)
    {
        return rePhotoMapper.selectRePhotoList(rePhoto);
    }

    /**
     * 新增photo
     * 
     * @param rePhoto photo
     * @return 结果
     */
    @Override
    public int insertRePhoto(RePhoto rePhoto)
    {
        return rePhotoMapper.insertRePhoto(rePhoto);
    }

    /**
     * 修改photo
     * 
     * @param rePhoto photo
     * @return 结果
     */
    @Override
    public int updateRePhoto(RePhoto rePhoto)
    {
        return rePhotoMapper.updateRePhoto(rePhoto);
    }

    /**
     * 批量删除photo
     * 
     * @param ids 需要删除的photo主键
     * @return 结果
     */
    @Override
    public int deleteRePhotoByIds(String ids)
    {
        return rePhotoMapper.deleteRePhotoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除photo信息
     * 
     * @param id photo主键
     * @return 结果
     */
    @Override
    public int deleteRePhotoById(Long id)
    {
        return rePhotoMapper.deleteRePhotoById(id);
    }


    public List<RePhoto> selectRePhotoListByReinfoId(Long reinfoId){
       return rePhotoMapper.selectRePhotoListByReinfoId(reinfoId);
    }
}
